﻿using DesignPattern.AdapterPattern02;
using DesignPattern.AdapterPattern02.ClassAdapter;
using DesignPattern.AdapterPattern02.ObjectAdapter;
using DesignPattern.CompositePattern03;
using DesignPattern.CompositePattern03._02;
using DesignPattern.FacadePattern.sample01;
using DesignPattern.FacadePattern01;
using DesignPattern.创建型模式.FactoryPattern;
using DesignPattern.行为型模式.ChainofResponsibility;
using DesignPattern.行为型模式.StatePattern;
using DesignPattern.行为型模式.StrategyPattern;
using System;

namespace DesignPattern
{
    class Program
    {
        static void Main(string[] args)
        {
            #region 结构型设计模式
            //Computer cp = new Computer();
            //.start();
            //cadePatternDemo.Run();
            //AdapterPatternObjectAdapter.Run();
            //AdapterPatternDemo.Run();
            //mpositePattern.Run();
            // CompositePattern02.Run();
            #endregion

            #region 行为型设计模式
            //StatePatternClient.Run();

            //先做火车，后改成飞机
            //StrategyPatternClient.Run();

            //公司规定，采购架构总价在1万之内，经理级别的人批准即可，
            //总价大于1万小于2万5的则还需要副总进行批准，
            //总价大于2万5小于10万的需要还需要总经理批准，
            //而大于总价大于10万的则需要组织一个会议进行讨论。
            //ChainofResponsibilityClient.Run();

            #endregion

            #region 创建型
            ShapeFactory shapeFactory = new ShapeFactory();
            创建型模式.FactoryPattern.Shape shape1 = shapeFactory.getShape("circle");
            shape1.Draw();

            创建型模式.FactoryPattern.Shape shape2 = shapeFactory.getShape("RECTANGLE");
            shape2.Draw();

            创建型模式.FactoryPattern.Shape shape3 = shapeFactory.getShape("SQUARE");
            shape3.Draw();
            #endregion

            Console.Read();

        }
    }
}
